package thread;
/**  线程的优先级
 * 线程一共有10个优先级分别用 */
public class PriorityDemo {
    public static void main(String[] args) {
  Thread min= new Thread(){
     public void run(){
         for (int i =0 ;i<1000;i++){
             System .out.println("min");
         }
     }

  };
  Thread max = new Thread(){
      public void run(){
          for(int i =0;i<1000;i++){
             System.out.println("max");
          }
      }
  };
  Thread norm = new Thread(){
      public void run(){
          for(int i=0;i<1000;i++){
              System.out.println("nor");
          }
      }
  };
 // min.setPriority(1);
 // max.setPriority(10);
 // norm.setPriority(5);
    min.setPriority(Thread.MIN_PRIORITY);
    max.setPriority(Thread.MAX_PRIORITY);
    norm.setPriority(Thread.NORM_PRIORITY);
    min.start();
    max.start();
    norm.start();
    }
}
